Hardcoding the date and time format strings can lead to formats that consumers misunderstand. Also, if the same format is meant to be used in
multiple places, it is easier to make a mistake when it’s hardcoded instead of using a format provided by an IFormatProvider
or using one
of the standard format strings.
What is the potential impact?
If a non-conventional format is used, the formatted date and time can be misunderstood. Also, if a mistake is made in the format, the formatted
date can be incomplete. For example, you might switch the place of the minutes and month parts of a date or simply forget to print the year.